package com.xinqi.modules.prepare.courseware.service;

import com.xinqi.common.base.response.PageInfo;
import com.xinqi.common.base.response.Param;
import com.xinqi.modules.prepare.common.dto.data.PrepareCoursewareData;
import com.xinqi.modules.prepare.courseware.dto.req.PrepareCoursewarePartCreateDTO;
import com.xinqi.modules.prepare.courseware.dto.req.PrepareCoursewarePartDeleteDTO;
import com.xinqi.modules.prepare.courseware.dto.req.PrepareCoursewarePartMoveQuestionDTO;
import com.xinqi.modules.prepare.courseware.dto.req.PrepareCoursewarePartQueryDTO;
import com.xinqi.modules.prepare.courseware.dto.req.PrepareCoursewarePartUpdateDTO;
import com.xinqi.modules.prepare.courseware.dto.rsp.PrepareCoursewarePartResultDTO;

import javax.validation.Valid;
import java.util.List;

/**
 * 备课区互动课件切片服务层
 *
 * @author: system
 * @date: 2023/03/19
 */
public interface PrepareCoursewarePartService {
    /**
     * 分页查询 备课区互动课件切片数据
     */
    PageInfo<PrepareCoursewarePartResultDTO> page(Param pageable, PrepareCoursewarePartQueryDTO query);

    /**
     * 查询 备课区互动课件切片数据
     */
    List<PrepareCoursewarePartResultDTO> find(PrepareCoursewarePartQueryDTO query);

    /**
     * 根据id查询 备课区互动课件切片数据
     */
    PrepareCoursewarePartResultDTO findById(Long id);

    /**
     * 新增 备课区互动课件切片数据
     */
    Long insert(@Valid PrepareCoursewarePartCreateDTO dto);

    void insert(Long prepareId, Long coursewareId, List<PrepareCoursewareData.PrepareCoursewarePartData> partList);

    /**
     * 根据id修改 备课区互动课件切片数据
     */
    Boolean updateById(@Valid PrepareCoursewarePartUpdateDTO dto);

    void update(List<PrepareCoursewarePartUpdateDTO> partList);

    /**
     * 根据id删除 备课区互动课件切片数据
     */
    Boolean deleteById(Long id);

    /**
     * 根据id删除 备课区互动课件切片数据
     */
    Boolean deleteById(PrepareCoursewarePartDeleteDTO dto);

    /**
     * 备课区互动课件切片-移动试题
     */
    Boolean moveQuestion(@Valid PrepareCoursewarePartMoveQuestionDTO dto);

}
